package org.example.elm_springboot.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.example.elm_springboot.mapper.OrdersMapper;
import org.example.elm_springboot.po.Orders;
import org.example.elm_springboot.service.OrdersService;
import java.util.List;

@Service
public class OrdersServiceImpl implements OrdersService {
    
    @Autowired
    private OrdersMapper ordersMapper;
    
    @Override
    public Orders getOrdersById(Integer orderId) {
        return ordersMapper.getOrdersById(orderId);
    }
    
    @Override
    public int createOrders(Orders orders) {
        return ordersMapper.createOrders(orders);
    }
    
    @Override
    public int updateOrderState(Orders orders) {
        return ordersMapper.updateOrderState(orders);
    }
    
    @Override
    public List<Orders> listOrdersByUserId(String userId) {
        return ordersMapper.listOrdersByUserId(userId);
    }
    
    @Override
    public int removeOrder(Integer orderId) {
        return ordersMapper.removeOrder(orderId);
    }
    
    @Override
    public int deleteOrder(Integer orderId) {
        return ordersMapper.deleteOrder(orderId);
    }
} 